﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UI
{
    public class MainLoad
    {
        public Command QiCommand = null;
        private Themes.ThemeChoose QiTheme = null;
        private Tools.AppSettings Settings = null;

        public MainLoad()
        {
            QiTheme = new Themes.ThemeChoose();
            QiCommand = new Command(QiTheme);
        }


        public MainLoad(string Json_For_ThemeSetting)
        {
            var basePath = Path.GetDirectoryName(typeof(App).Assembly.Location);
            QiTheme = new Themes.ThemeChoose($"{basePath}/{Json_For_ThemeSetting}");
            
            QiCommand = new Command(QiTheme);

            Tools.AppSettings Settings =  Tools.OP_AppSettings.LoadJson($"{basePath}/JsonS/AppSettings.json");
            QiCommand.PushData(Settings);
        }


    }
}
